The present inventions relates to systems and methods for enabling modification of software source code or machine readable instructions that have various types of elements which require significant effort to modify and are susceptible to errors when later modified. In particular, systems and methods for automated renumbering, reformatting, and re-referencing of branching statements or go-to instruction line referencing within modified code using a dual-pass approach.
Engineers in the Navy have sought to address disadvantages associated with current programming tools. Barriers to finding a solution to this long felt but unmet problem likely included how algorithms to perform various functions associated with embodiment of the invention are complex as they track lines of code as they are being assigned. For example, programs written in the Navy's circuit testing language ATLAS require line numbers for every line of code. When changes are made to a program written in the ATLAS language, the entire program must be renumbered. Renumbering the entire program leads to wasted time and effort. Additionally, the manual renumbering task is fraught with error and typically induces human error into the code creating compile difficulties. Prior to the invention, ATLAS programmers made numerous line deletions and insertions to their code but were then compelled to re-establish the line number order throughout the program. Every such line deletion/insertion necessitates that a substantial region of the code be completely renumbered. The ATLAS programmer had to make these line number changes by retyping new line numbers into their program. He/she had to be extremely careful that the lines numbers flowed in exact order and preferred increment. Additionally, and very problematically, he/she had to track the target line numbers, e.g., the line numbers that were destinations of branching statements. If the code insertions crossed logical boundaries, subsequent sections would also have to be renumbered thereby greatly increasing probability of error.
Various embodiments of the invention have been created including one referred to as ‘ATLAS Worx’. Various embodiment include a personal computer (PC)-based program. Various code elements provide a variety of capabilities. For example, an embodiment of the invention allows an ATLAS test developer to automatically renumber his/her ATLAS code after numerous changes are made to a program. The ATLAS developer no longer needs to track his/her line numbers or the “target” lines used in “code jumps”, etc. when making changes. Some embodiments include detailed & complex algorithms that flow through the ATLAS code and maintain a database of line numbers and all target line numbers. The program then passes again and makes all of the required changes to the line numbers and begins ATLAS “sections” of code at logical boundaries.
‘ATLAS Worx’ embodiments provide novel functionality or utility in a variety of ways. For example, at least some embodiments provide a capability for completely renumbering an entire ATLAS program for the ATLAS code developer. In so doing, it will assign “zero-suffix” line numbers at logical ATLAS code boundaries, assign uniform line number increments for every line, and fully track all target line numbers and make corresponding changes to the new assignments. ‘ATLAS Worx’ requires only a small processing time for the ATLAS programmer to identify his/her ATLAS program (e.g., PC-based directory browser) then approximately several seconds to renumber and make all of the necessary changes to the ATLAS program. A resulting ATLAS program may be written over the old program or stored in its own new file (e.g., as a default setting). Much complexity arises from functions such as an ability of at least some ‘ATLAS Worx’ embodiments to change branching numbers to new target numbers as they are being reassigned. In particular, in at least some embodiments, ‘ATLAS Worx’ will adjust the numbering so that key ATLAS sections will start with a new line number series (e.g., a line number “rolls over” and a step number. starts with “00”).
Additional features and advantages of the present invention will become apparent to those skilled in the art upon consideration of the following detailed description of the illustrative embodiment exemplifying the best mode of carrying out the invention as presently perceived.